package com.heaven1949.tmall.order.feign;

import com.heaven1949.tmall.common.core.dto.ApiResult;
import com.heaven1949.tmall.common.web.config.FeignConfig;
import com.heaven1949.tmall.order.feign.dto.ProductDTO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

/**
 * 商品信息feign接口
 *
 * @author zhangjian
 * @date 2023-03-10 16:28:13
 */
@FeignClient(value = "product-server", fallback = ProductFeignFallbackClient.class, configuration = FeignConfig.class)
public interface ProductFeignClient {

    /**
     * 商品信息-明细查询
     * @param id
     * @return
     */
    @GetMapping("/api/product/detail/{id}")
    ApiResult<ProductDTO> detail(@PathVariable("id") Long id);

}